Defines animation of any template parameter.
v1.3. Made obsolete in v2.0.
|
Name |
Type |
Array size |
Description |
|
reference |
{template name} |
|
Reference to a template. |
|
parameterIndex |
int |
|
Index of the template parameter to animate. The index is zero-based. |
|
keyType |
int |
|
0 = int 1 = float 2 = Vector 3 = ColorRGB 4 = ColorRGBA |
|
nKeys |
int |
|
Number of animation keys. |
|
keys |
array TimedFloatKeys |
nKeys |
Animation keys. |
This template works by considering the referenced template as a structure indexed by the parameterIndex value. For example, the following definition shows how the parameters in a SI_Camera template are indexed:
// The members of a template are indexed starting from 0: SI_Camera Camera1 { 0.000000; 2.000000; 20.000000;; // Camera1[0] = camera position vector 0.000000; -3.404255; 0.000000;; // Camera1[1] = interest position vector 0.000000; // Camera1[2] = roll 41.539440; // Camera1[3] = field of view 0.100000; // Camera1[4] = near plane 32768.000000; // Camera1[5] = far plane }
This example shows how to animate the position of the camera interest:
// Define a camera instance SI_Camera Camera1 { 0.000000; 2.000000; 20.000000;; 0.000000; -3.404255; 0.000000;; // Camera1[1] = interest position vector 0.000000; 41.539440; 0.100000; 32768.000000; } AnimationSet { Animation anim-Camera1 { {SCENE} SI_AnimationParamKey { {Camera1} // reference to the camera data object 1; // Camera1[1] is the interest vector 2; // vector animation key 59; // 59 animation keys to follow: // animation keys // <frame>; <nValues>; <value1>; ... <valueN>;; 1; 3; 0.000000, -3.404255, 0.000000;;, 2; 3; 0.000000, -3.341151, 0.000000;;, 3; 3; 0.000000, -3.161310, 0.000000;;, // other keys snipped... 100; 3; 0.000000, 19.347515, 0.000000;;; } } }
Example: Mesh Vertex Positions
This example shows how to animate the positions of polygon mesh vertices.
Frame frm-cube1 { FrameTransformMatrix { 1.000000,0.000000,0.000000,0.000000, 0.000000,1.000000,0.000000,0.000000, 0.000000,0.000000,1.000000,0.000000, 0.000000,0.000000,0.000000,1.000000;; } Mesh cube1 { 8; // cube1[0] = number of vertices -0.500000;-0.500000;-0.500000;, // cube1[1] = vertex 0 -0.500000;-0.500000;0.500000;, // cube1[2] = vertex 1 -0.500000;0.500000;-0.500000;, // cube1[3] = vertex 2 -0.500000;0.500000;0.500000;, // cube1[4] = vertex 3 0.500000;-0.500000;-0.500000;, // cube1[5] = vertex 4 0.500000;-0.500000;0.500000;, // cube1[6] = vertex 5 0.500000;0.500000;-0.500000;, // cube1[7] = vertex 6 0.500000;0.500000;0.500000;; // cube1[8] = vertex 7 6; // 6 polygons 4;0,1,3,2;, 4;1,5,7,3;, 4;5,4,6,7;, 4;4,0,2,6;, 4;4,5,1,0;, 4;2,3,7,6;; MeshMaterialList { ... SI_Material { ... } } SI_MeshNormals { ... } } } // Vertex position animation. // Note that while .XSI Export puts each SI_AnimationParamKey in a separate // Animation block, you can put multiple SI_AnimationParamKey in a single // Animation block and .XSI Import will load it correctly. AnimationSet { Animation anim-cube1 { {frm-cube1} SI_AnimationParamKey { // keys for vertex 1 {cube1} // reference to cube1 template 2; // index of vertex 1 in the cube1 template 2; // vector keys 77; // 77 keys 1; 3; -0.500000, -0.500000, 0.500000;;, 2; 3; -0.527668, -0.516229, 0.510289;;, 3; 3; -0.605175, -0.561691, 0.539113;;, ... 100; 3; -0.500000, -0.500000, 0.500000;;; } } Animation anim-cube1 { {frm-cube1} SI_AnimationParamKey { // keys for vertex 6 {cube1} // reference to cube1 template 7; // index of vertex 6 in the cube1 template 2; // vector keys 77; // 77 keys 1; 3; 0.500000, 0.500000, -0.500000;;, 2; 3; 0.500000, 0.500000, -0.500000;;, 3; 3; 0.500000, 0.500000, -0.500000;;, ... 100; 3; 0.500000, 0.500000, -0.500000;;; } } }
Autodesk Crosswalk v3.2